At 2:46 PM -0500 12/5/00, Tom Lane wrote:
>Hm. It's clearly possible to base Postgres's semaphore stuff on unnamed
>Posix semaphores living in the shared memory area (which eliminates the
>issue of inheritance by child processes). You'd need to revise the API
>presented by ipc.c so that it doesn't depend on semaphore IDs and keys.
Heh. True, but unfortunately Apple hasn't implemented _unnamed_ POSIX semaphores yet. (Please don't shoot the
messenger,I'll kill myself.)
But my patch to ipc.c to use named semaphores is actually pretty compact. It conditionalizes the function bodies of
IpcSemaphoreLockand related, and it changes the typedef of a IpcSemaphoreId from a int to a long, so I just pass the
keyused to create the semaphore back as the semid.
-pmb
--
"Every time you provide an option, you're asking the user to make a decision.
That means they will have to think about something and decide about it.
It's not necessarily a bad thing, but, in general, you should always try to
minimize the number of decisions that people have to make."
http://joel.editthispage.com/stories/storyReader$51